home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7503 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: dispatch.news.demon.net!demon!summat.demon.co.uk
  2. From: mike@summat.demon.co.uk (Mike Dodd)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: AUDIO INTERRUPTS!
  5. Date: Wed, 17 Apr 1996 20:08:13 GMT
  6. Message-ID: <1571.6681T1269T784@summat.demon.co.uk>
  7. References: <4kdrpj$kvf@svin09.win.tue.nl> <1137.6674T1301T2851@lando.demon.co.uk>
  8.     <4klthn$3rrb@trout.ab.umd.edu> <3174E32F.3490@fs1.ee.man.ac.uk>
  9. NNTP-Posting-Host: summat.demon.co.uk
  10. X-NNTP-Posting-Host: summat.demon.co.uk
  11. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  12.  
  13.  
  14. Mike staggered back from the pub and slurred to Christos Dimitrakakis:
  15.  
  16.  
  17.  CD> Hi.
  18.  CD> I have recently tried to create some real-time sound effects,
  19.  CD> (getting data from the parallel port and outputting to the sound chip)
  20.  CD> but I run into several problems.
  21.  
  22. Hey, I'm just about to hit this point in my own bit of coding...
  23.  
  24.  CD> 1) I need to send data to the audio chip directly from the CPU.
  25.  CD> The hardware manual does not have an example about how to do this,
  26.  CD> and furthermore it does not state in where exactly the bytes are
  27.  CD> placed in the AUDxDAT registers.
  28.  CD> If you look at the register index, each AUDxDAT register
  29.  CD> occupies 6 memory locations. Where am I supposed to place data?
  30.  CD> Which address? Which part of each long word?
  31.  
  32. Huh ? the AUDxDAT register is 2-bytes; there's a following four byte block to
  33. align each block to a 16-byte boundary (internal gubbins being the reason, no
  34. doubt).
  35.  
  36. As I understand the HRM, the AUDxDAT registers contain the 2 samples to be
  37. played consecutively, I'd imagine that the format would be...
  38.  
  39.          +---------|---------+
  40.          | Sample1   Sample2 |
  41.          +---------|---------+
  42.  
  43.             MSB        LSB
  44.  
  45. Each sample is a 2's complement byte format (i.e. -128->127 volume) and the
  46. words are output at the channel output rate. When the second word is transferred
  47. to the DAC the audio interrupt is generated. Unlike DMA driving, the sample will
  48. not be re-played after the last sample is output.
  49.  
  50. Don't know if that's any help ?
  51.  
  52.  
  53. --
  54. Mike    (mike@summat.demon.co.uk | fidonet@2:2500/73.10)
  55.  
  56.  
  57.